<template>
	<view>
		登录中...
	</view>
</template>

<script>
	export default {
		data() {
			return {
				
			}
		},
		
		onLoad() {
			
				let that = this
				uni.login({
					provider: 'weixin',
					success: function(loginRes) {
						// that.$u.vuex("vuex_code", loginRes.code);
						that.$u.api
						.auth({
							code: loginRes.code,
							scene: '',
							from_uid: ''
						})
						.then((res) => {
							that.$u.vuex("vuex_token", res.token);
							uni.reLaunch({
								url :"/pages/home/index"
							})
						});
					}
				});
			
		},
		methods: {
			
		}
	}
</script>

<style>

</style>
